package com.csu.ourpetstore1.persistence;

import com.csu.ourpetstore1.domain.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Mapper
public interface ProductMapper {


    List<Product> getProductListByCategory(String categoryId);

    Product getProduct(String productId);

    List<Product> searchProductList(String keywords);

    //新增商品大类
    void insertProduct(Product product);

    //通过id修改商品大类
    void updateProduct(@Param("product") Product product,@Param("productId") String productId);

    //通过id删除商品大类
    void deleteProduct(String productId);
}
